<?php
/* @var $this PropertyController */
/* @var $model Property */

$this->breadcrumbs=array(
	'Properties'=>array('index'),
	$model->id,
); 
$project=Project::model()->findByPk($model->Project_id);
if(!Yii::app()->user->isGuest){
$this->menu=array(
	array('label'=>'List Property', 'url'=>array('index')),
	array('label'=>'Create Property', 'url'=>array('create')),
	array('label'=>'Update Property', 'url'=>array('update', 'id'=>$model->id)),
	array('label'=>'Delete Property', 'url'=>'#', 'linkOptions'=>array('submit'=>array('delete','id'=>$model->id),'confirm'=>'Are you sure you want to delete this item?')),
	array('label'=>'Manage Property', 'url'=>array('admin')),
	array('label'=>'Request Price Quote', 'url'=>array('pricequote/requestprice','project'=>$project->name, 'property'=>$model->unit_number .'('. $model->unit_type .')', 'id'=>$project->id)),
);
}else{
$this->menu=array(
	array('label'=>'Go to Property\'s Project', 'url'=>array('project/view','id'=>$model->Project_id)),
	array('label'=>'Request Price Quote', 'url'=>array('pricequote/requestprice','project'=>$project->name, 'property'=>$model->unit_number .'('. $model->unit_type .')', 'id'=>$project->id)),
);
}
?>

<h1>View Property #<?php echo $model->id; ?></h1>

<?php
if(!Yii::app()->user->isGuest){
$this->widget('zii.widgets.CDetailView', array(
	'data'=>$model,
	'attributes'=>array(
		'id',
		'unit_number',
		'unit_type',
		'unit_area',
		'contract_price',
		'Project_id',
	),
)); 
}else{
$this->widget('zii.widgets.CDetailView', array(
	'data'=>$model,
	'attributes'=>array(
		//'id',
		'unit_number',
		'unit_type',
		'unit_area',
		'contract_price',
		//'Project_id',
	),
));
}

?>
